import request from '@/utils/request'

// 查询监考管理列表
export function listInvigilate(query) {
  return request({
    url: '/exam/invigilate/list',
    method: 'get',
    params: query
  })
}

// 查询监考管理详细
export function getInvigilate(id) {
  return request({
    url: '/exam/invigilate/' + id,
    method: 'get'
  })
}

// 新增监考管理
export function addInvigilate(data) {
  return request({
    url: '/exam/invigilate',
    method: 'post',
    data: data
  })
}

// 修改监考管理
export function updateInvigilate(data) {
  return request({
    url: '/exam/invigilate',
    method: 'put',
    data: data
  })
}

// 删除监考管理
export function delInvigilate(id) {
  return request({
    url: '/exam/invigilate/' + id,
    method: 'delete'
  })
}

// 导出监考管理
export function exportInvigilate(query) {
  return request({
    url: '/exam/invigilate/export',
    method: 'get',
    params: query
  })
}

// 获取监考列表
export function getInvigilateList(params) {
  return request({
    url: '/exam/invigilate/queryExaminee',
    method: 'get',
    params: params
  })
}

// 延时考试
export function addDelayed(params) {
  return request({
    url: '/exam/delayed/addDelayed',
    method: 'get',
    params: params
  })
}

// 获取当前场次下监考老师
export function getSessionTeacher(id) {
  return request({
    url: '/exam/invigilate/queryTeacher/' + id,
    method: 'get',
  })
}

export function deleteSessionTeacher(id) {
  return request({
    url: '/exam/invigilate/delete/' + id,
    method: 'post',
  })
}